﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BLL;

public partial class WebCommon_JobAdd : System.Web.UI.Page
{
    JobManager dllJobManager = new JobManager();
    string _target = "";
    protected void Page_Load(object sender, EventArgs e)
    {

        if(Session["SID"].ToString() ==null)
        {
            _target = Session["SID"].ToString();
        }
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        DataTable _job = new DataTable();
       
        if (_job.Rows.Count == 0)
        {
            object[] _value = new object[2];
            _value[0] = this.txtJobName.Text;
            _value[1] = this.txtJobRemark.Text;
            int result = dllJobManager.add(_value);
            if (result == 0)
            {
                Utility.Error.RedirectErrorPage("添加岗位未成功，请重试！");
            }
            else
            {
                Utility.HttpHelp.closeWindow("Job.aspx?SID="+_target, Page);
            }
        }
       
    }
}
